//package abg.core.domain.project;
//
//
//import com.alibaba.fastjson2.JSONObject;
//
///**
// * 统一参数接收对象
// */
//public class Param<A> extends JSONObject {
////    public ArrayList<Object> getList(String key) {
////        JSONArray key1 = getJSONArray(key);
////        if (key1 == null) return new ArrayList<>();
////        return new ArrayList<Object>(key1);
////    }
////
////    public <T> ArrayList<T> getList(String type, Class<T> c) {
////        JSONArray key1 = getJSONArray(type);
////        if (key1 == null) return new ArrayList<T>();
////        return new ArrayList<>(key1.toJavaList(c));
////    }
//
//    public <T> T getEntity(Class<T> tClass) {
//        return JSONObject.parseObject(toString(), tClass);
//    }
//
//
//    public String getString(String type, String defaultValue) {
//        String string = getString(type);
//        if (string == null) {
//            return defaultValue;
//        }
//        return string;
//    }
//
//
//    /**
//     * TODO 解析为指定类型
//     * 比如 接收到 {a:1,b:2,c:3,d:4} 四个属性此时通过 param.get('a') 这种 Key-Value 的形式 全部获取
//     * <p>
//     * 但是，通过 parseObj 会返回转换后的对象
//     * 如果 <ANY>类型中；只存在 d e f 三个属性；
//     * 那么转换后返回的对象中值结果为（ d=4; e=null; f=null; ）
//     *
//     * @return
//     */
////    public <T> T parseObj(Class<T> tClass) {
////        return null;
////    }
////
////    //当前参数是否为分页参数
////    public boolean isPage() {
////        return (StringKit.isNotBlank(this.getString("size")) && StringKit.isNotBlank(this.getString("current")));
////    }
////
////    public int pageCurrent() {
////        return this.getIntValue("current");
////    }
////
////    public int pageSize() {
////        return this.getIntValue("size");
////    }
////
////    public JSONObject getJSONObject(List<String> keys) {
////        return new JSONObject(MapKit.set(this, keys));
////    }
////
////    public JSONObject getJSONObject(String keysStr) {
////        return new JSONObject(MapKit.set(this, keysStr));
////    }
//
//
//    /**
//     * 验证不允许为空
//     */
////    public boolean checkNotNull(Collection<String> keys) {
////        return checkNotNullMessage(keys);
////    }
////
////    public boolean checkNotNull(String... keys) {
////        return checkNotNullMessage(ArrayKit.asList(keys));
////    }
//
////    private boolean checkNotNullMessage(Collection<String> keys) {
////        keys.forEach(key -> {
////            if (ObjectKit.isBlank(this.get(key))) {
////                throw new ServiceException("操作失败：参数【{0}】错误，不能为空。", key);
////            }
////        });
////        return true;
////    }
////
////    public boolean checkRegular(Regular regular, Collection<String> keys) {
////        return checkRegularMessage(regular, keys, null);
////    }
////
////    public boolean checkRegular(Regular regular, String... keys) {
////        return checkRegularMessage(regular, ArrayKit.asList(keys), null);
////    }
////
////    public boolean checkRegular(Regular regular, Collection<String> keys, String errorMessage) {
////        return checkRegularMessage(regular, keys, errorMessage);
////    }
////
////    public boolean checkRegular(Regular regular, String errorMessage, String... keys) {
////        return checkRegularMessage(regular, ArrayKit.asList(keys), errorMessage);
////    }
//
////    private boolean checkRegularMessage(Regular regular, Collection<String> keys, String errorMessage) {
////        keys.forEach(key -> {
////            if (!regular.check(this.get(key))) {
////                if (StringKit.isNotBlank(errorMessage)) {
////                    throw new ServiceException(errorMessage);
////                } else {
////                    throw new ServiceException("操作失败：{0}", regular.defaultErrorMessage());
////                }
////            }
////        });
////        return true;
////    }
//
////    public PageSearch getPageParam() {
////        int pageNumber = getIntValue("pageNumber");
////        int pageSize = getIntValue("pageSize");
////
////        if (pageNumber < 1) pageNumber = 1;
////
////
////        if (pageSize == 0) pageSize = 10;
////
////
////        if (pageSize >= 200) pageSize = 200;
////
////        PageSearch objectPageSearch = new PageSearch();
////        objectPageSearch.setPageNumber(pageNumber);
////        objectPageSearch.setPageSize(pageSize);
////        return objectPageSearch;
////    }
//}
